package com.mingqijia.gassafety.console.controller;

import com.gap.basic.base.CommonResponse;
import com.mingqijia.gassafety.webserver.request.workorder.asst.WorkOrderCreateRequest;
import com.mingqijia.gassafety.webserver.service.SmartKitchenService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * @author zhangfei
 * @version 1.0.0
 * @ClassName SmartKitchenController.java
 * @Description 智慧厨房设备相关接口
 * @createTime 2023年06月27日
 */
@RestController
@Api(tags = "智慧厨房设备相关接口")
@RequestMapping("/business/v1/smartKitchen")
@Slf4j
public class SmartKitchenController {

    @Autowired
    private SmartKitchenService smartKitchenService;


    @ApiOperation("转工单处理")
    @RequestMapping(value = "create", method = RequestMethod.POST)
    public CommonResponse<Object> create(@RequestBody @Valid WorkOrderCreateRequest req){
        smartKitchenService.create(req);
        return CommonResponse.success(null,"success");
    }
}


